package example;

import javax.swing.*;
import java.awt.*;

public class JavaGUI {
    public static void main(String[] args) {

        JFrame win1=new JFrame("第一个窗口");
        win1.setLayout(new FlowLayout());

        Container con=win1.getContentPane();
        con.setBackground(Color.YELLOW);

        win1.setBounds(60,100,300,400);

        JMenuBar menuBar=new JMenuBar();
        JMenu menu=new JMenu("水果菜单");
        menuBar.add(menu);
        win1.add(menuBar);

        win1.setVisible(true);

    }
}
